/*
 * XStatusInfo.java
 *
 * Created on 28 Апрель 2011 г., 23:12
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.jimm.protocol;

import org.jimm.app.JimmApplication;
import org.jimm.app.R;

/**
 * @author Vladimir Kryukov
 */
public class XStatusInfo {
    public static final int XSTATUS_NONE = -1;
    public static Integer icons[] = {
            R.drawable.x_none,
            R.drawable.x_angry,
            R.drawable.x_duck,
            R.drawable.x_tired,
            R.drawable.x_party,
            R.drawable.x_beer,
            R.drawable.x_think,
            R.drawable.x_eating,
            R.drawable.x_tv,
            R.drawable.x_friends,
            R.drawable.x_coffee,
            R.drawable.x_music,
            R.drawable.x_business,
            R.drawable.x_camera,
            R.drawable.x_funny,
            R.drawable.x_phone,
            R.drawable.x_games,
            R.drawable.x_college,
            R.drawable.x_shopping,
            R.drawable.x_sick,
            R.drawable.x_sleep,
            R.drawable.x_surfing,
            R.drawable.x_internet,
            R.drawable.x_engineering,
            R.drawable.x_typing,
            R.drawable.x_picnic,
            R.drawable.x_ppc,
            R.drawable.x_mobile,
            R.drawable.x_man,
            R.drawable.x_wc,
            R.drawable.x_question,
            R.drawable.x_way,
            R.drawable.x_love,
            R.drawable.x_search,
            R.drawable.x_diary,
            R.drawable.x_sex
    };

    @SuppressWarnings("unused")
    private String[] names = {

    };

    //    public XStatusInfo(Integer _icons[], String[] _names) {
//    	if (_icons != null) icons = _icons;
//    	if (_names != null) names = _names;
//    } 
    public XStatusInfo() {
    }

    public static int getIcon(int index) {
        if (icons == null)
            return 0;
        if (index < 0 || index > icons.length)
            return 0;

        return icons[index];
    }

    public String getName(int index) {
//        index = (index < 0) ? index : (index & 0xFF);
//        if ((0 <= index) && (index < names.length)) {
//            return names[index + 1];
//        }
        return JimmApplication.getInstance().getString(R.string.xstatus_none);
    }

    public int getXStatusCount() {
        return icons.length;
    }
}
